package vip.zhenzicheng.design_patterns.mediator;

/**
 * 具体的同事角色类
 *
 * @author zhenzicheng
 * @date 2022-05-27 13:28
 */
public class Tenant extends Person {
  public Tenant(String name, Mediator mediator) {
    super(name, mediator);
  }

  //和中介联系（沟通）
  public void contact(String message) {
    mediator.contact(message, this);
  }

  //获取信息
  public void getMessage(String message) {
    System.out.println("租房者" + name + "获取到的信息是：" + message);
  }
}
